package Test.Exam;

import java.util.Arrays;

/**
 * @ClassName Test01
 * @since: 2024/3/14 14:07
 * @auth: kirito
 * @description:
 *
 * // nums.length >= 3
 * // 数组中存在满足如下关系的3个下标 i,j,k 其中 i < j < k，且 nums[i] < nums[j] > nums[k]
 * // 返回在所有满足这种关系的i j k中，三者位置处的整数值之和最小值
 * // 题目保证nums中至少存在一组满足关系的i, j ,k
 * public int method(int[] nums) {
 *
 * }
 **/

/*User {
        userId int
        username string
        }
        Order {
        orderId int
        userId int
        cost int
        }
        统计一下总计花费金额大于等于1000元的用户姓名


select username from User where userId in
(select userId from Order group by userId  having sum(cost) >1000 )



        */
public class Test01 {
    static final int f = 1;
    public static void main(String[] args) {
        String a = "aB";
        String b = "aB";
        String c = new String("aB");
        String d = "a"+"B";
        String e = "a"+new String("B");
        System.out.println(a==c);
        System.out.println(a==e);
        System.out.println(a==d);
        System.out.println(a==b);


    }

    public static int find(int[] arr) {
        int min = 10000;
        for (int i = 0; i < arr.length; i++) {
            min = Math.min(arr[i],min);
        }
        return min;
    }

   public int method(int[] nums) {
       int len = nums.length;
       int res = 100000;

       for (int j = 1; j < len-1; j++) {


       }
//       for (int i = 0; i < len-2; i++) {
//           if (nums[i] >= nums[i + 1]) {
//               continue;
//           }
//           for (int j = i+1; j < len-1; j++) {
//               if (nums[j] <= nums[j + 1]) {
//                   continue;
//               }
//               for (int k = j+1; k < len; k++) {
//                   if (nums[i] < nums[j] && nums[j] > nums[k]) {
//                       int sum = nums[i] + nums[j] + nums[k];
//                       res = Math.min(res, sum);
//                   }
//               }
//           }
//       }
       return res;
  }
}
